package com.example.htmlspringtest.service.impl;

import com.example.htmlspringtest.dao.IndustryMapper;
import com.example.htmlspringtest.entity.oTestIndustrytype;
import com.example.htmlspringtest.service.IsIndustryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @belongsProject: HTML-Spring-test
 * @belongsPackage: com.example.htmlspringtest.service.impl
 * @author: dongmufengchun
 * @createTime: 2022-06-20  20:26
 * @description: TODO
 * @version: 1.0
 */
@Service
public class IndustryServiceImpl extends IsIndustryService {

    @Autowired
    private IndustryMapper industryMapper;

    /**
     * 功能简介: 对象查询
     *
     * @return java.util.List<T>
     * @Author dongmufengchun
     * @Date 16:26 2022/6/19
     **/
    @Override
    public List<oTestIndustrytype> findList() {
        return industryMapper.list();
    }


    /**
     * 功能简介: 对象保存
     *
     * @param oTestIndustrytype 对象t
     * @return int
     * @Author dongmufengchun
     * @Date 16:26 2022/6/19
     **/
    @Override
    public int save(oTestIndustrytype oTestIndustrytype) {
        return industryMapper.save(oTestIndustrytype);
    }

    /**
     * 功能简介: 对象删除
     *
     * @param id id
     * @return int
     * @Author dongmufengchun
     * @Date 16:26 2022/6/19
     **/
    @Override
    public int delete(Long id) {
        return industryMapper.delete(id);
    }

    /**
     * 功能简介: 修改
     *
     * @param oTestIndustrytype 对象t
     * @return int
     * @Author dongmufengchun
     * @Date 16:25 2022/6/19
     **/
    @Override
    public int update(oTestIndustrytype oTestIndustrytype) {
        return industryMapper.update(oTestIndustrytype);
    }

    /**
     * 功能简介: 根据ID查询对象
     *
     * @param id id
     * @return T
     * @Author dongmufengchun
     * @Date 16:25 2022/6/19
     **/
    @Override
    public oTestIndustrytype findById(Long id) {
        return industryMapper.findById(id);
    }
}

